package com.googlecode.flealancemarket.metamodel.beans;

import com.googlecode.flealancemarket.metamodel.Freelancer;
import com.googlecode.flealancemarket.metamodel.JobMessage;
import java.util.List;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.OneToMany;

@Entity
public class FreelancerBean extends UserBean implements Freelancer {

    private String resume;
    private List<JobMessage> jobMessages;

    public void setResume(String resume){
        this.resume = resume;
    }

    public String getResume(){
        return resume;
    }

    @OneToMany(targetEntity=JobMessageBean.class, mappedBy="author", fetch=FetchType.LAZY)
    public List<JobMessage> getJobMessages() {
        return jobMessages;
    }

    public void setJobMessages(List<JobMessage> jobMessages) {
        this.jobMessages = jobMessages;
    }

}